import request from '@/utils/request'

/**
 * 获取面经列表
 * @param {*} obj 参数
 * @returns
 */
export const getArticleListApi = (obj) => {
  return request({
    url: '/admin/interview/query',
    params: obj
  })
}

/**
 * 添加面经
 * @param {*} data 参数
 * @returns
 */
export const createArticleApi = (data) => {
  return request({
    url: '/admin/interview/create',
    method: 'post',
    data
  })
}

/**
 * 删除面经
 * @param {*} id 面经id
 * @returns
 */
export const delArticleApi = (id) => {
  return request({
    url: '/admin/interview/remove',
    method: 'delete',
    data: { id }
  })
}

/**
 * 获取面经详情
 * @param {*} id 面经id
 * @returns
 */
export const getArticleDetailApi = id => {
  return request({
    url: '/admin/interview/show',
    params: { id }
  })
}

/**
 * 面经编辑
 * @param {*} data 参数
 * @returns
 */
export const editArticleApi = data => {
  return request({
    url: '/admin/interview/update',
    method: 'put',
    data
  })
}
